<!DOCTYPE html>
<html>
<#include "../head.html">
    <body class="full">
    <div class="mc">
        <div>
            <div class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                           <#include "../operate/left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </div>
            <div class="mc-m">
                <div class="navToggle"></div>
            </div>
            <div class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="投资记录">
                        <#include "../operate/banner.html">
                            <!--面包屑导航---}-->

                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">
                                <div class="s_toolTop">
                                    <div class="toolbor-module export">
                                        <input type="button" onclick="exportxls()" value="导出列表" class="input-button export-btn"/>
                                    </div>

                                    <div class="toolbor-module export">
                                        &nbsp;&nbsp;&nbsp;投资人数：${tenderUserCnt?c}<br/>
                                        &nbsp;&nbsp;&nbsp;投资笔数：${tenderCnt?c}<br/>
                                        &nbsp;&nbsp;&nbsp;投资金额之和：${tenderCount?c}元<br/>
                                        &nbsp;&nbsp;&nbsp;回款金额之和：${repaymentCount?c}元
                                    </div>
                                </div>
                                <div class="s_toolTop">
                                    <div class="toolbor-module export">
                                        <div class="formTit">注册时间：</div>
                                        <input class="_search-value" name="regestertime" id="regestertime"  value="${regestertime}" onclick="change_picktime()"/>
                                        <div class="formTit"> 到 </div>
                                        <input class="_search-value" name="regestertimeTimeEnd" id="regestertimeTimeEnd"  value="${regestertimeTimeEnd}" onclick="change_picktime()"/>
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">投资时间：</div>
                                        <input class="_search-value" name="tenderTimeStart" id="tenderTimeStart"  value="${tenderTimeStart}" onclick="change_picktime()"/>
                                        <div class="formTit"> 到 </div>
                                        <input class="_search-value" name="tenderTimeEnd" id="tenderTimeEnd"  value="${tenderTimeEnd}" onclick="change_picktime()"/>
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">用户名：</div>
                                        <input type="hidden" name="types" value="user" />
                                        <input type="text" name="userName" id="userName" value="请输入用户名" class="search-value">
                                        <div class="formTit">手机：</div>
                                        <input type="text" name="phone" id="phone" value="请输入手机" class="search-value">
                                        <div class="formTit">项目名称：</div>
                                        <input type="text" name="borrowName" id="borrowName" value="请输入项目名称" class="search-value">
                                    </div>
                                </div>
                                <div class="s_toolTop">
                                    <div class="toolbor-module export">
                                        <div class="formTit">渠道来源：</div>
                                        <div class="select-box" id="channelSource">
                                            <div class="tag-select">全部</div>
                                            <ul class="tag-options" style="width:600px;right:-1px;left:auto;">
                                                <li data-value="" style="float:left;">全  部</li>
                                                <#if sourceList??>
                                                    <#list sourceList as item>
                                                        <li data-value="${item.name!''}"  style="float:left;">${item.name!''}</li>
                                                    </#list>
                                                </#if>
                                            </ul>
                                            <input type="hidden" id="channelSourceStr" value="${channelSource!}" />
                                        </div>
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">投资方式：</div>
                                        <div class="select-box" id="tenderType">
                                            <div class="tag-select">全部</div>
                                            <ul class="tag-options">
                                                <li data-value="">全  部</li>
                                                <li data-value="11">pc手动</li>
                                                <li data-value="12">pc自动</li>
                                                <li data-value="21">app</li>
                                                <li data-value="23">ios</li>
                                                <li data-value="24">Android</li>
                                            </ul>
                                        </div>
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">支付方式：</div>
                                        <div class="select-box" id="payType">
                                            <div class="tag-select">全部</div>
                                            <ul class="tag-options">
                                                <li data-value="">全  部</li>
                                                <li data-value="1">银行卡</li>
                                                <li data-value="2">余额+银行卡</li>
                                                <li data-value="0">余额</li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div class="s_toolTop">
                                    <div class="toolbor-module search">
                                        <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                                    </div>
                                </div>
                            </div>
                            <!--工具栏--}-->

                            <div id="main" class="clearfix">
                                <form action="" method="post">
                                    <table class="data-list">
                                        <tr class="header">
                                            <td>ID</td>
                                            <td>订单号</td>
                                            <td>用户名</td>
                                            <td>手机</td>
                                            <td>真实姓名</td>
                                            <td>项目名称</td>
                                            <td>年化收益</td>
                                            <td>借款期限</td>
                                            <td>投资金额</td>
                                            <td>计息天数</td>
                                            <td>回款金额</td>
                                            <td>支付方式</td>
                                            <td>渠道来源</td>   
                                            <td>投资方式</td>                    
                                            <td>投资时间</td>
                                            <td>回款时间</td>
   
                                        </tr>
        
                                         <#list list as item>
                                            <tr class="s">
                                                <td>${item[0]?c}</td>
                                                <td><#if item[1]??>${item[1]}<#else></#if></td>
                                                <td>${item[2]}</td>
                                                <td>${item[3]}</td>
                                                <td>${item[4]}</td>
                                                <td>${item[5]}</td>
                                                <td>${item[6]}</td>
                                                <td>${item[7]}</td>
                                                <td>${item[8]?c}元</td>
                                                <td>${item[9]}</td>             
                                                <td>${item[10]?c}元</td>
                                                <td>
                                                <!-- 2015-05-01后显示调整 -->
                                                <#if item[13] gt "20150430 23:59:59"?datetime("yyyyMMdd HH:mm:ss")>
                                                	<#if item[16] ==1>
                                                		银行卡
                                                	<#elseif item[16] ==2>
                                                		余额+银行卡
                                                	<#else>
                                                		余额
                                                	</#if>
                                                <#else>
                                                	${item[11]}
                                                </#if>
		                                         </td>    
		                                         <td><#if item[12]??>${item[12]}<#else></#if></td>
		                                         <td><#if item[15]??>
		                                               <#if item[15]==11>
		                                                   pc手动
		                                               <#elseif item[15]==12>     
		                                                   pc自动
		                                                <#elseif item[15]==21>   
		                                                   App
		                                                <#elseif item[15]==23> 
	                                                   	   ios
	                                                     <#elseif item[15]==24> 
	                                                       Android                                                                                                          
	                                                     <#else>
	                                                       
		                                               </#if> 
		                                              </#if> 
		                                         </td>
                                                 <td><#if item[13]??>${item[13]?string('yyyy-MM-dd HH:mm:ss')}</#if></td>
                                                <td><#if item[14]??>${item[14]?string('yyyy-MM-dd HH:mm:ss')}</#if></td> 
     
                                            </tr>
                                       	 	</#list> 
        
                                    </table>
                                </form>

                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>

                                    <!--翻页系统--{-->
                                    <div class="container s_formPage">
                                        <#import "../../common/page.html" as pager>
                                            <@pager.pagination page=page url="${pageUrl}" map=param style="style1" />
                                    </div>
                                    <!--翻页系统--}-->
                                </div>
                                <!--底部工具栏--}-->

                                <script type="text/javascript">
                                    var url='tenderRecord.html?search=true';
                                    var xlsurl='tenderRecord.html?type=export';
                                    
                                    function sousuo(){
                    					var sou = "";
                    					var userName = $("#userName").val();
                    					if (userName!=""&&userName!="请输入用户名"){
                    						sou += "&userName="+userName;
                    					}
                    					var phone = $("#phone").val();
                    					if(phone!=""&&phone!="请输入手机"){
                    						sou += "&phone="+phone;
                    					}
                    					var borrowName = $("#borrowName").val();
                    					if(borrowName!=""&&borrowName!="请输入项目名称"){
                    						sou += "&borrowName="+borrowName;
                    					}

                   					    var startDate = $("#tenderTimeStart").val();
                                       	var endDate = $("#tenderTimeEnd").val();
                                        if (startDate!=null){
                                            sou += "&tenderTimeStart="+startDate;
                                        }
                                        if (endDate!=null){
                                            sou += "&tenderTimeEnd="+endDate;
                                        }
                                        
                                        var startDat = $("#regestertime").val();
                                       	var endDat = $("#regestertimeTimeEnd").val();
                                        if (startDat!=null){
                                            sou += "&regestertime="+startDat;
                                        }
                                        if (endDat!=null){
                                            sou += "&regestertimeTimeEnd="+endDat;
                                        }
                                        
                                        
                                        
                                        var payType = $("#payType").find(".open-selected").attr("data-value");
                                        if(payType!=null&&payType!=""&&payType!="undefine"){
                                        	sou += "&payType="+payType;
                                        }          
                                        var tenderType = $("#tenderType").find(".open-selected").attr("data-value");
                                        if(tenderType!=null&&tenderType!=""&&tenderType!="undefine"){
                                        	sou += "&tenderType="+tenderType;
                                        } 
                                        var channelSource = $("#channelSource").find(".open-selected").attr("data-value");
                                        if(channelSource!=null&&channelSource!=""&&channelSource!="undefine"){
                                        	sou += "&channelSource="+channelSource;
                                        }
                                        
                    					if (sou!=""){
                    							location.href=url+sou;
                    						}
                    					}
                                    
                                    
                                  function exportxls(){
                                    time();
										var num='${(page.total)?c}'; 
				num=num.replace(",",""); 
				if(num>30000){ //条数自己定义，但必须小于65536 
					alert("数据过多，请选择指定的时间进行数据查询导出！"); //提示信息根据不同的内容注意修改下。 
					return false; 
				}
                  					var sou = "";
                					var userName = $("#userName").val();
                					if (userName!=""&&userName!="请输入用户名"){
                						sou += "&userName="+userName;
                					}
                					var phone = $("#phone").val();
                					if(phone!=""&&phone!="请输入手机"){
                						sou += "&phone="+phone;
                					}
                					var borrowName = $("#borrowName").val();
                					if(borrowName!=""&&borrowName!="请输入项目名称"){
                						sou += "&borrowName="+borrowName;
                					}

               					    var startDate = $("#tenderTimeStart").val();
                                   	var endDate = $("#tenderTimeEnd").val();
                                    if (startDate!=null){
                                        sou += "&tenderTimeStart="+startDate;
                                    }
                                    if (endDate!=null){
                                        sou += "&tenderTimeEnd="+endDate;
                                    }
                                                    
                                    var startDat = $("#regestertime").val();
                                   	var endDat = $("#regestertimeTimeEnd").val();
                                    if (startDat!=null){
                                        sou += "&regestertime="+startDat;
                                    }
                                    if (endDat!=null){
                                        sou += "&regestertimeTimeEnd="+endDat;
                                    }
                                    
                                    
                                    var payType = $("#payType").find(".open-selected").attr("data-value");
                                    if(payType!=null&&payType!=""&&payType!="undefine"){
                                    	sou += "&payType="+payType;
                                    }          
                                    var tenderType = $("#tenderType").find(".open-selected").attr("data-value");
                                    if(tenderType!=null&&tenderType!=""&&tenderType!="undefine"){
                                    	sou += "&tenderType="+tenderType;
                                    } 
                                    var channelSource = $("#channelSource").find(".open-selected").attr("data-value");
                                    if(channelSource!=null&&channelSource!=""&&channelSource!="undefine"){
                                    	sou += "&channelSource="+channelSource;
 									}else{
                                        sou += "&channelSource="+$("#channelSourceStr").val();
                                    }
                                   
                                    if (sou!=""){
                                        location.href=xlsurl+sou;
                                    }else{
                                        location.href=xlsurl;
                                    }
                                  
                                  }         
                              //秒倒计时
                                        var tmpWait = 10;                    
                                        function time() {
                                            if (tmpWait>0) {
                                                $('.export input').attr("disabled", true);
                                                $('.export input').val(tmpWait + "秒后再试");
                                                --tmpWait;
                                                setTimeout(function() {
                                                        time();
                                                    },
                                                    1000)
                                            } else {
                                                tmpWait = 10;
                                                $('.export input').removeAttr("disabled");
                                                $('.export input').val("导出列表");
                                            }
                                        }
                                </script>
                            </div>

            </div>
        </div>
        <div>
            <!--尾部--{-->
            <td colspan="3" class="mc-b"><#include "../foot.html"></td>
            <!--尾部--}-->
        </div>
    </div>

    </body>
</html>
<#include "../jsPage.html">
